/**
 * 
 */
package com.et114.components.acegi.exception;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * @author guanhw
 */
public class CacheException extends net.sf.ehcache.CacheException {
	/**
	 * 
	 */
	private static final long	serialVersionUID	= - 175745096768577094L;
	private Log					log					= LogFactory.getLog ( getClass ( ) );
	private Throwable			_rootCause;
	private Object modCache ; 
	private String goBackUrl ; 
	/**
	 * 
	 */
	public CacheException ( ) {
		super ( );
	}
	
	/**
	 * 
	 * @param message
	 */
	public CacheException ( String message ) {
		super ( message );
	}
	
	/**
	 * @param cause
	 */
	public CacheException ( Throwable cause ) {
		super ( cause );
	}
	
	
	public Object getModCache ( ) {
		return modCache;
	}

	public void setModCache ( Object modCache ) {
		this.modCache = modCache;
	}

	public String getGoBackUrl ( ) {
		return goBackUrl;
	}

	public void setGoBackUrl ( String goBackUrl ) {
		this.goBackUrl = goBackUrl;
	}

	/**
	 * 
	 * 
	 * @param message
	 * @param cause
	 */
	public CacheException ( String message , Throwable cause ) {
		super ( message );
		if ( cause instanceof CacheException ) {
			_rootCause = ( ( CacheException ) cause )._rootCause;
		} else {
			_rootCause = cause;
		}
		log.error ( message , cause );
	}	
}
